00001 00004 class Path: public TraffEduObject{ 00005 private: 00006 00007 osg::Vec3 controlPointArray[MAXCONTROLPOINTS]; 00008 osg::Vec3 pointArray[MAXPOINTS]; 00009 double rotationArray[MAXPOINTS]; 00010 int numControlPoints ; 00011 int numPoints ; 00012 int controlPointsIndex; 00013 int rotationArrayIndex; 00014 osg::Geode* lineGeode; 00015 osg::Geometry* lineGeom; 00016 osg::Geode* dotGeode; 00017 osg::Geometry* dotGeom; 00018 osg::Group* lineGroup; 00019 osg::Group* dotGroup; 00020 public: 00025 Path(); 00031 Path(string pathname,float scale); 00038 void draw(osg::ref_ptr<osg::Group> root,int animationFlag=-1); 00043 void deletePart(); 00056 osg::Vec3 calculateCatmull(osg::Vec3 first, osg::Vec3 second , osg::Vec3 third ,osg::Vec3 fourth, double fifth); 00065 void setPoints(double number=1.0); 00071 osg::Node* displayLines(void); 00077 osg::Node* displayDots(void); 00085 void addNewPoint( osg::Vec3 first,double number=1.0); 00091 osg::Vec3* getControlPointVector(); 00097 osg::Vec3* getPointVector(); 00103 double* getRotationArray(); 00108 void setRotationArray(); 00117 double returnAngle(osg::Vec3d first, osg::Vec3d second); 00118 00119 00120 00121 }; 00122 00123 00124 00125 00126
1.4.6-NO